#ifndef _vfx_SIMPLE_SFX_
#define _vfx_SIMPLE_SFX_

#include "sfx.h"
#include "ui/ui_sprite.h"
#include "math/vec2.h"
#include "math/counter.h"
namespace vfx
{

// holder for sprites that only exists for one cycle
class SpriteSFX : public SFXSet
{
public:
	struct	SimpleSprite
	{
		ui::UISprite		Sprite;
		math::Vec2			Pos;
		math::Vec2			Size;
		COLOR				Color;
		bool				Active;
	};
	SpriteSFX(EffectMan*	pParent, const std::string& Image, int	MaxCount, bool Floating = false, bool Additive = false);
	~SpriteSFX();
	virtual void			Render(const math::Vec2& Offset, float Scale);
	virtual void			Tick(float dt);
	void					AddSprite(const math::Vec2& Pos, const math::Vec2& Size,  bool IsFlipped,COLOR Color = 0xFFFFFFFF);
	void					AddSprite(const math::Vec2& Pos,  bool IsFlipped, COLOR Color = 0xFFFFFFFF);
	void					AddCentered(const math::Vec2& Pos, bool IsFlipped, COLOR Color = 0xFFFFFFFF);
	void					GetSpriteSize(math::Vec2& Size);
private:
	int						m_MaxCount;
	int						m_CurrentCount;
	SimpleSprite*			m_SpriteA;
	bool					m_Floating;
	bool					m_Additive;
	math::Vec2				m_Size;
};

};
#endif // _vfx_SIMPLE_SFX_
